#include "MainWindowManager.h"

#include "Core/MainWindow.h"

MainWindowManager* MainWindowManager::m_instance = nullptr;

MainWindowManager* MainWindowManager::GetInstance()
{
    if (nullptr == m_instance) {
        m_instance = new MainWindowManager;
    }
    return m_instance;
}

std::shared_ptr<MainWindow> MainWindowManager::NewMainWindow()
{
    std::shared_ptr<MainWindow> mainWindow = std::make_shared<MainWindow>();
    mainWindow->show();
    m_mainWindowList.push_back(mainWindow);

    return mainWindow;
}

MainWindowManager::~MainWindowManager()
{
    m_mainWindowList.clear();
}
